﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta name="description" content="" />
    <meta name="author" content="" />
    <!--[if IE]>
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <![endif]-->
    <title>Free Responsive Admin Theme - ZONTAL</title>
    <!-- BOOTSTRAP CORE STYLE  -->
    <link href="assets/css/bootstrap.css" rel="stylesheet" />
    <!-- FONT AWESOME ICONS  -->
    <link href="assets/css/font-awesome.css" rel="stylesheet" />
    <!-- CUSTOM STYLE  -->
    <link href="assets/css/style.css" rel="stylesheet" />
    <!-- 引入bootstrap-table的css -->
    <link  href="/table/bootstrap-table.min.css" rel="stylesheet" >
     <!-- HTML5 Shiv and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
    <header>
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <strong>Email: </strong>info@yourdomain.com
                    &nbsp;&nbsp;
                    <strong>Support: </strong>+90-897-678-44
                </div>

            </div>
        </div>
    </header>
    <!-- HEADER END-->
    <div class="navbar navbar-inverse set-radius-zero">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="showEnterprise.html">

                    <img src="assets/img/logo.png" />
                </a>

            </div>

            <div class="left-div">
                <div class="user-settings-wrapper">
                    <ul class="nav">

                        <li class="dropdown">
                            <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
                                <span class="glyphicon glyphicon-user" style="font-size: 25px;"></span>
                            </a>
                            <div class="dropdown-menu dropdown-settings">
                                <div class="media">
                                    <a class="media-left" href="#">
                                        <img src="assets/img/64-64.jpg" alt="" class="img-rounded" />
                                    </a>
                                    <div class="media-body">
                                        <h4 class="media-heading">Jhon Deo Alex </h4>
                                        <h5>Developer & Designer</h5>

                                    </div>
                                </div>
                                <hr />
                                <h5><strong>Personal Bio : </strong></h5>
                                Anim pariatur cliche reprehen derit.
                                <hr />
                                <a href="#" class="btn btn-info btn-sm">Full Profile</a>&nbsp; <a href="login.html" class="btn btn-danger btn-sm">Logout</a>

                            </div>
                        </li>


                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!-- LOGO HEADER END-->
    <section class="menu-section">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <div class="navbar-collapse collapse ">
                        <ul id="menu-top" class="nav navbar-nav navbar-right">
                            <li><a href="http://localhost:8083/money.html">我的支付宝</a></li>
                            <li><a href="ui.html">账户设置</a></li>
                            <li><a href="http://localhost:8083/dealinfo.html">交易记录</a></li>
                            <li><a class="menu-top-active" href="http://localhost:8083/product.html">商品商城</a></li>
                            <li><a href="http://localhost:8083/coupon.html">商品优惠券</a></li>
                            <li><a href="http://localhost:8083/youhuijuanling.html">我的优惠券</a></li>
                            <li><a href="http://localhost:8083/recycle.html">回收站</a></li>
                        </ul>
                    </div>
                </div>

            </div>
        </div>
    </section>
    <!-- MENU SECTION END-->
    <div class="content-wrapper">
        <div class="container">
            <div class="row">
                    <div class="col-md-12">
                        <h1 class="page-head-line">商品展示</h1>
                    </div>
                </div>
            <div class="row">
                <div class="col-md-12">
                  <!--   Product-->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Product
                        </div>
                        <div class="panel-body">
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover" id="table">

                                </table>
                            </div>
                        </div>
                    </div>
                     <!-- End  Product -->
                </div>

            </div>

        </div>
    </div>
    <!-- CONTENT-WRAPPER SECTION END-->
    <footer>
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    &copy; 2018 YourCompany | By : <a href="http://www.designbootstrap.com/" target="_blank">DesignBootstrap</a>
                </div>

            </div>
        </div>
    </footer>
    <!-- FOOTER SECTION END-->
    <!-- JAVASCRIPT AT THE BOTTOM TO REDUCE THE LOADING TIME  -->
    <!-- CORE JQUERY SCRIPTS -->
    <script src="assets/js/jquery-1.11.1.js"></script>
    <!-- BOOTSTRAP SCRIPTS  -->
    <script src="assets/js/bootstrap.js"></script>
    <!-- 引入bootstrap-table的js-->
    <script type="text/javascript" src="/table/bootstrap-table.min.js"></script>
<script>

    window.operateEvents = {
        'click .RoleOfedit': function (e, value, row, index) {
            var id = row.productId
            alert(id)
            location.href="order.html?id="+id;
            $("#upload").modal('show');
        }
    };
    //加载产品列表
    $(function(){
        $('#table').bootstrapTable({
            columns:[
                {checkbox:true,}, //复选框
                {field:'productId',  disabled : true,title:'产品ID',width:100}, //复选框
                {field:'productName',title:'产品名称',width:100},
                {field:'productPrice',title:'价格',width:100,sortable:true},
                {field:'productType',title:'类型',width:100},
                {field:'operate',title:'操作',width:100,events: operateEvents,
                    formatter: operateFormatter}
            ],
            showToggle:true,
            showColumns:true,
            showRefresh:true,
            url:'http://localhost:8026/enterprise/selectProductInfo',
            method:'GET',
            queryParams:function(param){
                return {
                    page: this.pageNum,
                    rows: this.pageSize,
                };
            },
            sortable: false,                     //是否启用排序
            sortName:'proPrice',
            sortOrder:'asc',
            search:true,//启用搜索框
            searchOnEnterKey:true,//点击回车进行搜索
            //分页方式
            sidePagination:'server',
            pagination: true,                   //是否显示分页（*）
            pageNum: 1,                       //每页的记录行数（*）
            pageSize: 3,                       //每页的记录行数（*）
            pageList: [3, 6, 9,12],        //可供选择的每页的行数（*）
            //发送到服务器的数据编码类型  {order: "asc", offset: 0, limit: 5}
            contentType:'application/x-www-form-urlencoded;charset=UTF-8',   //数据编码纯文本  offset=0&limit=5
            //toolbar:'#tabToolBar',
        });
    })
    function operateFormatter(value, row, index) {
        return [
            '<input type="submit" value="立即购买" class="RoleOfedit btn btn-primary btn-sm"   data-toggle="modal" style="display:inline">',
        ].join('');
    }
</script>
</body>
</html>
